﻿#ifndef __SS_DATE_TIMER_H__
#define __SS_DATE_TIMER_H__
#include "../../message/ssMsgIdDef.h"
#include "../../container/ssHeap.h"
#include "../../tools/ssIDAlloter.h"
#include "../ssTimerDispatch.h"

namespace StarSeeker
{

class ssDateTimer : public ssTimerDispatch
{
public:
	ssDateTimer();
	virtual ~ssDateTimer();
	//添加计时器
	u32 AddTimer(u32 msgType, u64 timestamp, u32 interval, ulint p1, ulint p2);
	u32 AddTimer(u32 msgType, u32 interval, ulint param1, ulint param2);
	//启动半点计时器
	void StartHalfTimer();
	//删除计时器
	void RemoveTimer(u32 timerId);
	//当前任务数
	ulint GetTimerCount();
	//更新计时器
	void Update(u64 nowTimestamp);
protected:
	ssHeap<ssTimer_s>		m_msgHeap;	//消息堆
	ssCumulationID<u32>		m_ids;
};

}
#endif
